package wiki.kaizen.cloud.shiro.stateless.exception;

import lombok.Getter;
/**
 * 异常类型枚举
 * */
public enum ErrorTypeEnum {

    USER_ERROR(
        new StatelessException(40000,"请求参数有误")
    ),

    NOT_LOGIN(
        new StatelessException(40100,"未登录")
    ),
    LOGIN_MISSED(
        new StatelessException(40101,"登录状态已丢失,请重新登录")
    ),
    REPEAT_LOGIN(
        new StatelessException(40102,"您已在其他地方登录")
    ),
    INVALID_TOKEN(
        new StatelessException(40110,"无效的请求凭证,请重新登录")
    ),
    EXPIRED_TOKEN(
        new StatelessException(40111,"请求凭证已过期,请重新登录")
    ),
    NO_AUTHORITY(
        new StatelessException(40300,"没有请求权限")
    ),
    UNKNOWN(
        new StatelessException(90000,"未知异常")
    );

    @Getter
    private StatelessException exception;

    ErrorTypeEnum(StatelessException exception){
        this.exception = exception;
    }
}
